//
//  PiceMessageTableViewCell.m
//  GLGW_Shoping
//
//  Created by yang on 2018/11/19.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "PiceMessageTableViewCell.h"

@implementation PiceMessageTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        GLGWLabel * dayTimeLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(88), kHeightProportion_In_iPhoneTriploid(10), KScreenWidth - kWidthProportion_In_iPhoneTriploid(176), kHeightProportion_In_iPhoneTriploid(30)) theFont:SYSTEMFONT(14) theColor:[UIColor whiteColor] inSuperView:self];
        dayTimeLabel.backgroundColor = [UIColor colorWithHexString:@"#000000" alpha:0.3];
        dayTimeLabel.textAlignment = NSTextAlignmentCenter;
        dayTimeLabel.layer.masksToBounds = YES;
        dayTimeLabel.layer.cornerRadius = kHeightProportion_In_iPhoneTriploid(15);
        dayTimeLabel.text = @"2018年09月12日 12:23";
        //
        GLGWView * bankgroundView = [[GLGWView alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(15), kY_With_View(dayTimeLabel, 15), KScreenWidth - kWidthProportion_In_iPhoneTriploid(30), kHeightProportion_In_iPhoneTriploid(115)) inSuperView:self];
        bankgroundView.backgroundColor = [UIColor whiteColor];
        [bankgroundView setViewShadowWidth:3.0 theCornerRadius:3.0];
        //
        GLGWLabel * titleLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(15), kHeightProportion_In_iPhoneTriploid(10), bankgroundView.width - kWidthProportion_In_iPhoneTriploid(30), kHeightProportion_In_iPhoneTriploid(30)) theFont:SYSTEMFONT(16) theColor:kColor_Rule_Black inSuperView:bankgroundView];
        titleLabel.text = @"您的求购单有新的报价！";
        //
        GLGWLabel * specLabel = [[GLGWLabel alloc] initWithFrame:CGRectMake(titleLabel.x, kY_With_View(titleLabel, 5), bankgroundView.width - kWidthProportion_In_iPhoneTriploid(70), kHeightProportion_In_iPhoneTriploid(60)) theFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#666666"] inSuperView:bankgroundView];
        specLabel.numberOfLines = 0;
        specLabel.text = @"碳钢弯头 Q235 70*20*40 1碳钢弯头 Q235 70*20*40 1碳钢弯头 Q235 70*20*40 1碳钢弯头 Q235 70*20*40 1碳钢弯头 Q235 70*20*40 1碳钢弯头 Q235 70*20*40 1碳钢弯头 Q235 70*20*40 1碳钢弯头 Q235 70*20*40 1碳钢弯头 Q235 70*20*40 1碳钢弯头 Q235 70*20*40 1碳钢弯头 Q235 70*20*40 1";
        //
        GLGWImageView * pushIamgeView = [[GLGWImageView alloc] initWithImageName:@"ff" inSuperView:bankgroundView];
        pushIamgeView.backgroundColor = kRandomColor;
        [pushIamgeView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(bankgroundView.mas_right).offset(-kWidthProportion_In_iPhoneTriploid(15));
            make.centerY.equalTo(bankgroundView);
            make.width.equalTo(@(kWidthProportion_In_iPhoneTriploid(22)));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(22)));
        }];
    }
    return self;
}

@end
